package com.xuecheng.order.controller;

import com.xuecheng.commons.model.vo.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xuecheng.order.service.PaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 订单支付信息前端控制器
 * </p>
 *
 * @author HuangYuwu
 */
@Slf4j
@RestController
public class PaymentController {

    @Autowired
    private PaymentService  paymentService;

    /**
     * 生成支付链接
     * @param orderNo
     * @return
     */
    @GetMapping("/payment/createPay")
    public ResponseResult createPay(String orderNo){
        return paymentService.createPay(orderNo);
    }
}
